package day1026.TuXing;
//长方形
public class Rectangle extends  Image {
    private int a,b;

    public Rectangle(int a, int b) {
        this.a = a;
        this.b = b;
    }

    @Override
    public double mianji() {
        double result =0.0;
        result =a*b;
        System.out.println("长方形面积:"+result);
        return result;
    }

    @Override
    public double zhouchang() {
        double result =0.0;
        result =(a+b)*2;
        System.out.println("长方形周长是:"+result);
        return result;
    }
}
